import { createRoot } from 'react-dom/client'
import Routers from './router'
import '@/common/styles/frame.styl'
import { ConfigProvider } from 'antd'
import { store, persistor } from './store'
import { Provider } from 'react-redux'
import zhCN from 'antd/locale/zh_CN'
import '@ant-design/v5-patch-for-react-19'
import './mock'
import { detectOS } from './common/js/commonLib'
import { PersistGate } from 'redux-persist/integration/react'

document.body.setAttribute('os', detectOS())

createRoot(document.getElementById('root')).render(
  <Provider store={ store }>
    <PersistGate loading={null} persistor={persistor}>
      <ConfigProvider locale={zhCN}>
        <Routers />
      </ConfigProvider>
    </PersistGate>
  </Provider>
)
